package com.lkqm.seckill.dto;

/**
 * 秒杀系统Json数据返回DTO
 * Created by luokaiqiongmou on 2016/11/28.
 */
public class SeckillResult <T> {

    private boolean success;

    private String errorInfo;

    private T data;

    public SeckillResult(boolean success, String errorInfo) {
        this.success = success;
        this.errorInfo = errorInfo;
    }

    public SeckillResult(boolean success, T data) {
        this.success = success;
        this.data = data;
    }

    public boolean isSuccess() {
        return success;
    }

    public String getErrorInfo() {
        return errorInfo;
    }

    public T getData() {
        return data;
    }

    @Override
    public String toString() {
        return "SeckillResult{" +
                "success=" + success +
                ", errorInfo='" + errorInfo + '\'' +
                ", data=" + data +
                '}';
    }
}
